package com.hellowx.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by IntelliJ IDEA.
 *
 * @author MagicMushroom
 * @date 2021/7/20
 */
@RestController
@RequestMapping("/product")
public class ProductController {

    @Value("${server.port}")
    private Integer port;

    private static final Logger log = LoggerFactory.getLogger(ProductController.class);

    @GetMapping("/{id}")
    public String test1(@PathVariable("id") Integer id){
        log.info("product test ok-"+id+"-"+port);
        return "product test ok-"+id+"-"+port;
    }
}
